define(["../../../Core/Cartesian4","../../../Core/Cartesian3","../../../Core/Cartesian2","../../../Core/Ray","../../../Core/defined","../../../Core/Ellipsoid","../../../Scene/PGEarth3DTileset"],function(e,i,n,r,s,t,o){
    var c=new i;function a(e){this.viewer=e,this.scene=e.scene}
    return a.prototype.pickGlobe=function(e,i,n){
        var position = e,
            cartesian = this.scene.pickPosition(position),
            cartographic,
            ellipsoid = this.scene.globe.ellipsoid;
        if (cartesian) {
            cartographic = ellipsoid.cartesianToCartographic(cartesian);
        } else {
            try {
                var ray = this.viewer.scene.camera.getPickRay(position);
                cartesian = this.viewer.scene.globe.pick(ray, this.viewer.scene);
                cartographic = t.WGS84.cartesianToCartographic(cartesian);
            } catch(e) {}
        }
        return cartesian;
    },
    a
});
